package n7.restaurant.java.Entity;

import java.util.ArrayList;

import n7.restaurant.java.Enum.Etat_Serveur;
import n7.restaurant.java.Enum.Role;


public class Agent implements Runnable {

	private String id;
	private Role role;
	private ArrayList<Etat_Mental> etat_mentaux;
	private Position position;
	private Etat_Serveur etat;

	public Etat_Serveur getEtat() {
		return etat;
	}

	public void setEtat(Etat_Serveur etat) {
		this.etat = etat;
	}

	public Agent() {
		this.etat_mentaux = new ArrayList<Etat_Mental>();
		this.etat=Etat_Serveur.free;
	}

	public Agent(String id, Role role, ArrayList<Etat_Mental> etat_mentaux,
			Position position) {
		this.id = id;
		this.role = role;
		this.etat_mentaux = etat_mentaux;
		this.position = position;
		this.etat_mentaux = new ArrayList<Etat_Mental>();
		this.etat=Etat_Serveur.free;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public ArrayList<Etat_Mental> getEtat_mentaux() {
		return etat_mentaux;
	}

	public void setEtat_mentaux(ArrayList<Etat_Mental> etat_mentaux) {
		this.etat_mentaux = etat_mentaux;
	}

	public Position getPosition() {
		return position;
	}

	public void setPosition(Position position) {
		this.position = position;
	}

	@Override
	public String toString() {
		return "Agent [id=" + id + ", role=" + role + ", etat_mentaux="
				+ etat_mentaux + ", " + position + "]" + "\n";
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub

	}

	public void addEtatMental(Etat_Mental e) {
		this.etat_mentaux.add(e);
	}

	public void deleteEtatMental(Etat_Mental e) {
		this.etat_mentaux.remove(e);
	}
}
